﻿using System;

namespace Sixeyed.CodeGeneration.Attributes
{
    /// <summary>
    /// Attribute specifying the metadata provider and item key for a generated item
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
    public sealed class GeneratedCodeProviderAttribute : Attribute
    {
        private string _providerType;
        private string _itemKey;

        /// <summary>
        /// Provider type name
        /// </summary>
        public string ProviderType
        {
            get { return this._providerType; }
        }

        /// <summary>
        /// Item identifier
        /// </summary>
        public string ItemKey
        {
            get { return this._itemKey; }
        }

        /// <summary>
        /// Constructor with initial state
        /// </summary>
        /// <param name="providerType">Provider type name</param>
        /// <param name="itemKey">Item identifier</param>
        public GeneratedCodeProviderAttribute(string providerType, string itemKey)
        {
            this._providerType = providerType;
            this._itemKey = itemKey;
        }
    }
}
